projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5aea9db
)
core: Work around libguestfs/FUSE issue with setuid binaries
author
Colin Walters
<walters@verbum.org>
Fri, 26 Jul 2013 18:48:15 +0000
(14:48 -0400)
committer
Colin Walters
<walters@verbum.org>
Fri, 26 Jul 2013 18:48:15 +0000
(14:48 -0400)
For some reason, the setuid bits are being stripped. This
workaround is enough for now.
src/libostree/ostree-core.c
patch
|
blob
|
history
diff --git
a/src/libostree/ostree-core.c
b/src/libostree/ostree-core.c
index ef9595d4396c58d326eb936015ba1b2e172fa996..8a989373e2a9cbd98ad21be8dbb7730e7cb6e442 100644
(file)
--- a/
src/libostree/ostree-core.c
+++ b/
src/libostree/ostree-core.c
@@
-1245,6
+1245,16
@@
ostree_create_file_from_input (GFile *dest_file,
if (!g_output_stream_close ((GOutputStream*)out, NULL, error))
goto out;
+
+ /* Work around libguestfs/FUSE bug */
+ if (mode & (S_ISUID|S_ISGID))
+ {
+ if (chmod (dest_path, mode) == -1)
+ {
+ ot_util_set_error_from_errno (error, errno);
+ goto out;
+ }
+ }
}
else if (S_ISLNK (mode))
{